package com.chemical.search.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *@className:Userinfo.java
 *@classDescription:
 *@author:MChen
 *@createTime:2012-4-19
 */
@Entity
@Table(name = "user_info")
public class UserInfo {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer user_id; 	 // 主键id
	@Column(name = "user_name", nullable = false)
	private String user_name;	 // 用户名
	@Column(name = "user_password",nullable = false)
	private String user_password;// 用户密码
	@Column(name = "user_email")
	private String user_email;	 // 用户email
	@OneToOne
	@JoinColumn(name = "user_groupID")
	private UserGroup userGroup; // 用户所在组
	@Column(name = "user_addTime",nullable = false)
	private Date user_addTime;   // 用户注册时间
	@Column(name = "allowvisit")
	private int allowvisit;		 // 是否具有访问权限(置为0表示禁止访问详细信息)
	
	public Integer getUser_id() {
		return user_id;
	}
	public void setUser_id(Integer userId) {
		user_id = userId;
	}
	public String getUser_name() {
		return user_name;
	}
	public void setUser_name(String userName) {
		user_name = userName;
	}
	public String getUser_password() {
		return user_password;
	}
	public void setUser_password(String userPassword) {
		user_password = userPassword;
	}
	public String getUser_email() {
		return user_email;
	}
	public void setUser_email(String userEmail) {
		user_email = userEmail;
	}
	public UserGroup getUserGroup() {
		return userGroup;
	}
	public void setUserGroup(UserGroup userGroup) {
		this.userGroup = userGroup;
	}
	public Date getUser_addTime() {
		return user_addTime;
	}
	public void setUser_addTime(Date userAddTime) {
		user_addTime = userAddTime;
	}
	public int getAllowvisit() {
		return allowvisit;
	}
	public void setAllowvisit(int allowvisit) {
		this.allowvisit = allowvisit;
	}
}
